﻿<%@ Page Language="C#" MasterPageFile="~/CmsMaster.Master" AutoEventWireup="true"
         CodeBehind="ListConsultant.aspx.cs" Inherits="ContractManagementSystem.Presentation.ProfileManagement.ListConsultant"
         Title="Profile Manager >>> List Consultant" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="Stylesheet" type="text/css" href="../../Styles/ClientStyle.css" />

    <script type = "text/javascript" language = "javascript" src = "../../JavaScript/JsLibrary.js"> </script>    
    <script type = "text/javascript" language = "javascript" src = "../../JavaScript/jquery.js"> </script>
    <script type = "text/javascript" language = "javascript" src = "../../JavaScript/menu.js"> </script>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentHolder" runat="server">
    <div class="CPF">
        <div id="CPFalertMessage" >
            <asp:Label runat="server" ID="labelResult" CssClass="CPFResultMessage" Visible="false" ></asp:Label>
        </div> 
        
        <div class="CPFSearch">
            <div class="CPFclientleft">
                <asp:Label ID="Label1" runat="server">Full Name:</asp:Label>
            </div>
            <div class="CPFclientright">
                <asp:TextBox runat="server" ID="textFullName" CssClass="CPFTextBox"></asp:TextBox>
            </div>
            <div class="CPFclientleft">
                <asp:Label ID="Label2" runat="server">Company Name:</asp:Label>
            </div>
            <div class="CPFclientright">
                <asp:TextBox runat="server" ID="textCompanyName" CssClass="CPFTextBox"></asp:TextBox>
            </div>
            <div class="CPFButtonSearch">
                <asp:Button runat="server" ID="ButtonSearch" Text="Search" CssClass="CPFButton1"
                            OnClick="ButtonSearchClick" />
            </div>
        </div>
        <asp:ScriptManager runat="server" ID="test"></asp:ScriptManager>
        <div class="CPFGrid">
            <asp:ListView ID="ListViewConsultant" runat="server" OnItemCommand="ListViewConsultantItemCommand"
                          OnItemDeleting="ListViewConsultantItemDeleting">
                <LayoutTemplate>
                    <table class="repeaterTable">
                        <tr class="tableHeader">
                            <td>
                            </td>
                            <td>
                                UserName
                            </td>
                            <td>
                                Full Name
                            </td>
                            <td>
                                Email
                            </td>
                            <td>
                                CompanyName
                            </td>
                            <td>
                                PhoneNumber
                            </td>
                            <td>
                                Address
                            </td>
                            <td>
                                Action
                            </td>
                        </tr>
                        <tr id="itemPlaceholder" runat="server">
                        </tr>
                    </table>
                
                    <table class="CPFrepeaterTable" >
                        <tr class="CPFtableHeader">
                        
                            <td>
                                 <asp:LinkButton ID="linkDelSelected" ForeColor="Blue" runat="server" CssClass="CPFDeletePage" 
                                        OnConsultantClick='javascript:return confirm("Are you sure you want to delete?")' 
                                        CommandArgument='<%#Eval("ConsultantId")%>'
                                        onclick="LinkDelSelectedClick">Delete Selected</asp:LinkButton>
                            </td>  
                                                  
                            <td class="CPFPage">
                                <asp:DataPager runat="server" ID="ItemDataPager" PageSize="10">
                                    <Fields>
                                        <asp:NextPreviousPagerField ShowFirstPageButton="true" ShowNextPageButton="false" ButtonCssClass="CPFNumPage" />
                                        <asp:NumericPagerField ButtonCount="5" CurrentPageLabelCssClass="CPFCurrentNumPage" NumericButtonCssClass="CPFNumPage" />
                                        <asp:NextPreviousPagerField ShowLastPageButton="true" ShowPreviousPageButton="false" ButtonCssClass="CPFNumPage"/>
                                    </Fields>
                                </asp:DataPager>
                            </td>
                        </tr>
                      
                       
                    </table>
                
                </LayoutTemplate>
                <ItemTemplate>
                    <tr class="CPFTr">
                        <td>
                            <input type="checkbox" runat="server" ID="checkDelete" value='<%#Eval("ConsultantId")%>'>
                        </td>

                        <td class="CPFtd">
                            <asp:Label ID="labelUserName" runat="server"><%#DataBinder.Eval(Container.DataItem, "UserName")%></asp:Label>
                        </td>
                        <td class="CPFtd">
                            <a href="ViewConsultant.aspx?id=<%#Eval("ConsultantID")%>">
                                <asp:Label ID="labelFullName" runat="server"><%#DataBinder.Eval(Container.DataItem, "FullName")%></asp:Label>
                            </a>
                        </td>
                        <td class="CPFtd">
                            <asp:Label ID="labelEmail" runat="server"><%#DataBinder.Eval(Container.DataItem, "Email")%></asp:Label>
                        </td>
                        <td class="CPFtd">
                            <asp:Label ID="labelCompanyName" runat="server"><%#DataBinder.Eval(Container.DataItem, "CompanyName")%></asp:Label>
                        </td>
                        <td class="CPFtd">
                            <asp:Label ID="labelPhoneNumber" runat="server"><%#DataBinder.Eval(Container.DataItem, "PhoneNumber")%></asp:Label>
                        </td>
                        <td class="CPFtd">
                            <asp:Label ID="labelAddress" runat="server"><%#DataBinder.Eval(Container.DataItem, "Address")%></asp:Label>
                        </td>
                        <td class="CPFtd">
                            <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick='javascript:return confirm("Are you sure you want to delete?")'
                                            CommandName="Delete" CommandArgument='<%#Eval("ConsultantId")%>'>
                                <asp:Image ID="Image1" runat="server" CssClass="CPFdelete" ImageUrl="../../Images/CPFdelete.png">
                                </asp:Image>
                            </asp:LinkButton>
                            <a href="UpdateConsultant.aspx?id=<%#Eval("ConsultantId")%>">
                                <asp:Image ID="Image2" runat="server" CssClass="CPFdelete" ImageUrl="../../Images/CPFedit.png">
                                </asp:Image>
                            </a>
                        </td>
                    </tr>
                </ItemTemplate>
                
                <EmptyItemTemplate>
                    <label style="text-align: center; color: #FF0000; font-size: 18px;">Not data</label>
                </EmptyItemTemplate>
                
                <EmptyDataTemplate>
                     <table class="repeaterTable">
                        <tr class="tableHeader">  
                            <td>
                                UserName
                            </td>
                            <td>
                                Full Name
                            </td>
                            <td>
                                Email
                            </td>
                            <td>
                                CompanyName
                            </td>
                            <td>
                                PhoneNumber
                            </td>
                            <td>
                                Address
                            </td>
                            <td>
                                Action
                            </td>
                        </tr>
                        <tr id="itemPlaceholder" runat="server">
                        </tr>
                         <tr>
                            <td colspan="8" class="CPFNotData">
                                <label style="color: #FF0000; font-size: 18px;">Sorry ! no data found</label>
                            </td>                            
                        </tr>                          
                    </table>

                </EmptyDataTemplate> 
                
            </asp:ListView>
        </div>        

    </div>
</asp:Content>